def isPrime(n):
    if n < 2:
        return False
    else:
        for i in range(2,int(pow(n,0.5)+1)):
            if n % i == 0:
                return False
            else:
                return True
try:
    n = eval(input("请输入你要检测的数字："))
    if(isPrime(n)):
        print("你所检测的数字是质数")
    else:
        print("你所检测的数字不是质数")
except:
    print("输入错误，请重新输入！")
